﻿using BLL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Dryricenet.houTai
{
    public partial class orderDetails_Look : System.Web.UI.Page
    {
        public int id = 0;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                id = Convert.ToInt32(Request.QueryString["orderid"]);
                Refresh(id);
                int t = Convert.ToInt32(OrderDetailsBLL.dataNumBLL());
                Label1.Text = "以上数据共" + t + "条";
            }
        }
        //刷新
        public void Refresh(int id)
        {
            GridView1.DataSource = OrderDetailsBLL.orderDetailsCXBLL(id);
            GridView1.DataBind();
        }
        //分页
        protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            GridView1.PageIndex = e.NewPageIndex;
            Refresh(id);
        }
    }
}